package com.power.project.api;

import com.power.common.domain.PageDataResponse;
import com.power.common.domain.ResponseDTO;
import com.power.project.model.bo.ProjectSaveBO;
import com.power.project.model.bo.ProjectUserSaveBO;
import com.power.project.model.pageInfo.P_projectuserPageInfo;
import com.power.project.model.vo.ProjectVO;
import com.power.project.model.vo.UserBaseVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import com.power.project.model.pageInfo.P_projectPageInfo;


/**
 *  项目 Feign
 */
public interface IP_projectFeign {

    /**
     * 项目分页列表
     */
    @PostMapping("/p_project/list")
    ResponseDTO<PageDataResponse<ProjectVO>> list(@RequestBody P_projectPageInfo p_projectPageInfo);


    /**
    * 查看项目
    */
    @GetMapping("/p_project/view")
    ResponseDTO view(@RequestParam("id") Integer id);

    /**
     * 查看项目下的关联的人员  
     */
    @GetMapping("/p_project/queryProjectAndUsers")
    ResponseDTO<PageDataResponse<UserBaseVO>> queryUsersByPid(P_projectuserPageInfo p_projectPageInfo);


    /**
    * 删除项目
    */
    @PostMapping("/p_project/delete")
    ResponseDTO delete(@RequestParam("id") Integer id);

    /**
     * 修改或保存项目
     */
    @PostMapping("/p_project/save")
    ResponseDTO save(@RequestBody ProjectSaveBO saveBO);


    /**
     * 添加项目关联人员
     */
    @PostMapping("/p_project/addUser")
    ResponseDTO<Void> addUser(@RequestBody ProjectUserSaveBO projectUserSaveBO);

    /**
     * 移除项目关联人员
     */
    @PostMapping("/p_project/removerUser")
    ResponseDTO<Void> removeUser(@RequestBody ProjectUserSaveBO projectUserSaveBO);

    /**
     * 修改项目人员
     */
    @PostMapping("/p_project/editUser")
    ResponseDTO<Void> editUser(@RequestBody ProjectUserSaveBO projectUserSaveBO);

}
